package com.ruoyi.zsyh.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.zsyh.mapper.ZsyhServiceTypeMoneyMapper;
import com.ruoyi.zsyh.domain.ZsyhServiceTypeMoney;
import com.ruoyi.zsyh.service.IZsyhServiceTypeMoneyService;
import com.ruoyi.common.core.text.Convert;

/**
 * 维修定价标准Service业务层处理
 * 
 * @author yuexl
 * @date 2024-08-22
 */
@Service
public class ZsyhServiceTypeMoneyServiceImpl implements IZsyhServiceTypeMoneyService 
{
    @Autowired
    private ZsyhServiceTypeMoneyMapper zsyhServiceTypeMoneyMapper;

    /**
     * 查询维修定价标准
     * 
     * @param id 维修定价标准ID
     * @return 维修定价标准
     */
    @Override
    public ZsyhServiceTypeMoney selectZsyhServiceTypeMoneyById(String id)
    {
        return zsyhServiceTypeMoneyMapper.selectZsyhServiceTypeMoneyById(id);
    }

    /**
     * 查询维修定价标准列表
     * 
     * @param zsyhServiceTypeMoney 维修定价标准
     * @return 维修定价标准
     */
    @Override
    public List<ZsyhServiceTypeMoney> selectZsyhServiceTypeMoneyList(ZsyhServiceTypeMoney zsyhServiceTypeMoney)
    {
        return zsyhServiceTypeMoneyMapper.selectZsyhServiceTypeMoneyList(zsyhServiceTypeMoney);
    }

    /**
     * 新增维修定价标准
     * 
     * @param zsyhServiceTypeMoney 维修定价标准
     * @return 结果
     */
    @Override
    public int insertZsyhServiceTypeMoney(ZsyhServiceTypeMoney zsyhServiceTypeMoney)
    {
        zsyhServiceTypeMoney.setCreateTime(DateUtils.getNowDate());
        return zsyhServiceTypeMoneyMapper.insertZsyhServiceTypeMoney(zsyhServiceTypeMoney);
    }

    /**
     * 修改维修定价标准
     * 
     * @param zsyhServiceTypeMoney 维修定价标准
     * @return 结果
     */
    @Override
    public int updateZsyhServiceTypeMoney(ZsyhServiceTypeMoney zsyhServiceTypeMoney)
    {
        zsyhServiceTypeMoney.setUpdateTime(DateUtils.getNowDate());
        return zsyhServiceTypeMoneyMapper.updateZsyhServiceTypeMoney(zsyhServiceTypeMoney);
    }

    /**
     * 删除维修定价标准对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteZsyhServiceTypeMoneyByIds(String ids)
    {
        return zsyhServiceTypeMoneyMapper.deleteZsyhServiceTypeMoneyByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除维修定价标准信息
     * 
     * @param id 维修定价标准ID
     * @return 结果
     */
    @Override
    public int deleteZsyhServiceTypeMoneyById(String id)
    {
        return zsyhServiceTypeMoneyMapper.deleteZsyhServiceTypeMoneyById(id);
    }
    public int deleteZsyhServiceTypeMoneyByUserStoreId(String id)
    {
        return zsyhServiceTypeMoneyMapper.deleteZsyhServiceTypeMoneyByUserStoreId(id);
    }
}
